/*
 * 创建日期 2009-11-11
 *
 * 成都天和软件公司
 * 电话：028-85425861
 * 传真：028-85425861-8008
 * 邮编：610041 
 * 版权所有
 */
package  org.fantasy.cpp.core.item.date;

import  org.fantasy.cpp.core.bean.ParamContext;
import  org.fantasy.cpp.core.html.QueryHtml;
import  org.fantasy.cpp.core.html.query.QueryHtmlFactory;

/**
 *  日期输入框
 * @author: 王文成
 * @version: 1.0
 * @since 2009-11-11
 */
public class DateBetweenItem extends AbstractDateItem {

	/**
	 * 生成HTML
	 * 
	 * @return
	 */
	@Override
	public String getHtml() throws Exception {
		String startName = getStartName();
		String endName = getEndName();
		ParamContext param = getParamContext();
		param.set(QueryHtml.START_NAME, startName);
		param.set(QueryHtml.END_NAME, endName);
		String html = QueryHtmlFactory.getDateBetweenBuilder(request, param).getHtml();
		return html;
	}

	private String getStartName() {
		return item.getItemName() + "Start";
	}

	private String getEndName() {
		return item.getItemName() + "End";
	}
}
